import React, { useState } from 'react'
import { View } from '@tarojs/components'
import { useLoad } from '@tarojs/taro'
import { getDetailData } from '../../api/home'
export default function Detail() {

    const [detail, setDetail] = useState({})

    useLoad((option) => {
        console.log('onLoad', option.proid)
        getDetailData(option.proid).then(res => {
            setDetail(res.data)
        })
    })

    return (
        <View>
            {detail.proname}
        </View>
    )
}
